{% extends "base.html" %}
{% block title %}
<center><h3>后台管理</h3></center>
<hr class="colorgraph"/>
{% endblock title %}

{% block content %}
<div>
<h4 style="border-left: 2px solid #205081;">索引管理</h4>
	<button id="rebuildIndex" data-url="{{ url_for('pages.rebuildIndex') }}" type="button" class="btn btn-sm btn-info">重建索引</button>
	<div class="progress" style="display: none;">
  		<div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar" data-value='5' style="width: 5%">
  </div>
</div>
</div>
<div>

<h4 style="border-left: 2px solid #205081;">备份管理</h4>
{% if bakData|length >0 %}
<div class="table-responsive">
  <table class="table table-hover">
        <thead>
          <tr>
            <th>文件名</th>
            <th>大小</th>
            <th>下载</th>
            <th>删除</th>
          </tr>
        </thead>
        <tbody>
        {% for data in bakData %}
          <tr>
            <td>{{ data.name }}</td>
            <td>{{ data.size }}</td>
            <td><button class="downbakBtn btn btn-sm btn-info" data-url='{{ url_for("admin.backupDownload",key=data.name) }}'>下载</button></td>
            <td><button class="delbakBtn btn btn-sm btn-danger" data-url='{{ url_for("admin.backupDelete",key=data.name) }}' >删除</button></td>
          </tr> 
         {% endfor %}
        </tbody>
  
  </table>
</div>
{% else %}
暂无数据
{% endif %}
</div>
{% endblock content %}
{% block endscriptjs %}
<script src="{{ url_for('static', filename='manage.js') }}"></script>       
{% endblock endscriptjs %}